﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LoginWithFacebook.aspx.cs" Inherits="LoginWithFacebook.LoginWithFacebook" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    
    
     <div>
            <h1>Login with Facebook</h1>
                <br />
                    <a href="#" class="button"  id="A1"
                                      onclick="javascript:OpenFaceBookLoginPopup();" name="butrequest"> <span>Login with FaceBook</span></a>
            <br />
            
            <br />
            <table>
                <tr>
                    <td>Facebook ID</td>
                    <td><%=FacebookID%></td>
                </tr>
                <tr>
                    <td>Email </td>
                    <td><%=Email%></td>
                </tr>
                <tr>
                    <td>FirstName</td>
                    <td><%=FirstName%></td>
                </tr>
                <tr>
                    <td>LastName</td>
                    <td><%=LastName%></td>
                </tr>
            </table>
        </div>
    </form>
    <script type="text/javascript" language=javascript>

        
        function OpenFaceBookLoginPopup() {

            var url = "https://www.facebook.com/dialog/oauth?";
            url += "client_id=<%=Facebook_ClientID %>";
            url += "&redirect_uri=<%=Facbook_ReturnURL %>/LoginWithFacebook1.aspx&response_type=token";
    
            window.location = url;
               }

               
    </script>
</body>
    
</html>


